﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Community.CsharpSqlite
{
    class ActionCode
    {

        /*
    ** CAPI3REF: Authorizer Action Codes
    **
    ** The [sqlite3_set_authorizer()] interface registers a callback function
    ** that is invoked to authorize certain SQL statement actions.  The
    ** second parameter to the callback is an integer code that specifies
    ** what action is being authorized.  These are the integer action codes that
    ** the authorizer callback may be passed.
    **
    ** These action code values signify what kind of operation is to be
    ** authorized.  The 3rd and 4th parameters to the authorization
    ** callback function will be parameters or NULL depending on which of these
    ** codes is used as the second parameter.  ^(The 5th parameter to the
    ** authorizer callback is the name of the database ("main", "temp",
    ** etc.) if applicable.)^  ^The 6th parameter to the authorizer callback
    ** is the name of the inner-most trigger or view that is responsible for
    ** the access attempt or NULL if this access attempt is directly from
    ** top-level SQL code.
    */
        /******************************************* 3rd ************ 4th ***********/
        //#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
        //#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
        //#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
        //#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
        //#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */
        //#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */
        //#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */
        //#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */
        //#define SQLITE_DELETE                9   /* Table Name      NULL            */
        //#define SQLITE_DROPCode.OP_INDEX           10   /* Index Name      Table Name      */
        //#define SQLITE_DROPCode.OP_TABLE           11   /* Table Name      NULL            */
        //#define SQLITE_DROPCode.OP_TEMP_INDEX      12   /* Index Name      Table Name      */
        //#define SQLITE_DROPCode.OP_TEMP_TABLE      13   /* Table Name      NULL            */
        //#define SQLITE_DROPCode.OP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */
        //#define SQLITE_DROPCode.OP_TEMP_VIEW       15   /* View Name       NULL            */
        //#define SQLITE_DROPCode.OP_TRIGGER         16   /* Trigger Name    Table Name      */
        //#define SQLITE_DROPCode.OP_VIEW            17   /* View Name       NULL            */
        //#define SQLITE_INSERT               18   /* Table Name      NULL            */
        //#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
        //#define SQLITE_READ                 20   /* Table Name      Column Name     */
        //#define SQLITE_SELECT               21   /* NULL            NULL            */
        //#define SQLITE_TRANSACTION          22   /* Operation       NULL            */
        //#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
        //#define SQLITE_ATTACH               24   /* Filename        NULL            */
        //#define SQLITE_DETACH               25   /* Database Name   NULL            */
        //#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
        //#define SQLITE_REINDEX              27   /* Index Name      NULL            */
        //#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
        //#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
        //#define SQLITE_DROPCode.OP_VTABLE          30   /* Table Name      Module Name     */
        //#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
        //#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */
        //#define SQLITE_COPY                  0   /* No longer used */
        public const int SQLITE_CREATE_INDEX = 1;
        public const int SQLITE_CREATE_TABLE = 2;
        public const int SQLITE_CREATE_TEMP_INDEX = 3;
        public const int SQLITE_CREATE_TEMP_TABLE = 4;
        public const int SQLITE_CREATE_TEMP_TRIGGER = 5;
        public const int SQLITE_CREATE_TEMP_VIEW = 6;
        public const int SQLITE_CREATE_TRIGGER = 7;
        public const int SQLITE_CREATE_VIEW = 8;
        public const int SQLITE_DELETE = 9;
        public const int SQLITE_DROP_INDEX = 10;
        public const int SQLITE_DROP_TABLE = 11;
        public const int SQLITE_DROP_TEMP_INDEX = 12;
        public const int SQLITE_DROP_TEMP_TABLE = 13;
        public const int SQLITE_DROP_TEMP_TRIGGER = 14;
        public const int SQLITE_DROP_TEMP_VIEW = 15;
        public const int SQLITE_DROP_TRIGGER = 16;
        public const int SQLITE_DROP_VIEW = 17;
        public const int SQLITE_INSERT = 18;
        public const int SQLITE_PRAGMA = 19;
        public const int SQLITE_READ = 20;
        public const int SQLITE_SELECT = 21;
        public const int SQLITE_TRANSACTION = 22;
        public const int SQLITE_UPDATE = 23;
        public const int SQLITE_ATTACH = 24;
        public const int SQLITE_DETACH = 25;
        public const int SQLITE_ALTER_TABLE = 26;
        public const int SQLITE_REINDEX = 27;
        public const int SQLITE_ANALYZE = 28;
        public const int SQLITE_CREATE_VTABLE = 29;
        public const int SQLITE_DROP_VTABLE = 30;
        public const int SQLITE_FUNCTION = 31;
        public const int SQLITE_SAVEPOINT = 32;
        public const int SQLITE_COPY = 0;

    }
}
